<table class="commodity-table">
	<thead>
		<tr>
			<th colspan="4">订单详细情况</th>
		</tr>
	</thead>
	<tbody>
		<tr>
			<td colspan="4">
				订单号：<span class="important">${_order.id}</span>&nbsp;&nbsp;
				订单状态：
				<span class="important">
					#{if _order.orderStatus == models.Order.OrderStatus.NEW}
						新订单，可发汇款确认
					#{/if}
					#{if _order.orderStatus == models.Order.OrderStatus.PAID}
						已付款，等待客服确认
					#{/if}
					#{if _order.orderStatus == models.Order.OrderStatus.PAY_CONFIRM}
						付款已认，等待发货
					#{/if}
					#{if _order.orderStatus == models.Order.OrderStatus.SENDED}
						已发货
					#{/if}
					#{if _order.orderStatus == models.Order.OrderStatus.HISTORY}
						历史订单
					#{/if}
					#{if _order.orderStatus == models.Order.OrderStatus.FAIL}
						订单作废
					#{/if}
				</span>&nbsp;&nbsp;
				订单总额：<span class="important">${_order.totalPrice}</span> 元
			</td>
		</tr>
		<tr>
			<td class="leftSide" style="width:150px;">订货方式：</td>
			<td class="rightSide">
				#{if _order.orderingType=="SELF"}自己订货#{/if}
				#{if _order.orderingType=="AGENT"}代发货#{/if}
			</td>
			<td class="leftSide" style="width:150px;">提交时间:</td>
			<td class="rightSide">${_order.createAt.format("yyyy-MM-dd hh:mm:ss")}</td>
		</tr>
		<tr>
			<td class="leftSide">配送方式：</td>
			<td class="rightSide">
				#{if _order.transferPrice && _order.transferPrice.company}
					<font class="price">${_order.transferPrice.company.companyName}</font>
				#{/if}
				起步运价为 <font class="price">${_order.baseFreight}</font> 元&nbsp;
				起步重量为 <font class="price">${_order.baseFreightKG}</font> 公斤&nbsp;
				超重后每公斤收 <font class="price">${_order.freightPerKG}</font> 元&nbsp;
			</td>
			<td class="leftSide">收货人姓名:</td>
			<td class="rightSide">${_order.receiver}</td>
		</tr>
		<tr>
			<td class="leftSide">电话或手机：</td>
			<td class="rightSide">${_order.phoneNo}</td>
			<td class="leftSide">E-mail:</td>
			<td class="rightSide">${_order.email}</td>
		</tr>
		<tr>
			<td class="leftSide">邮编：</td>
			<td class="rightSide">${_order.zipCode}</td>
			<td class="leftSide">收货地址:</td>
			<td class="rightSide">${_order.deliveryAddress}</td>
		</tr>
		<tr>
			<td class="leftSide">指定送达时间：</td>
			<td class="rightSide">
				#{if _order.arrivalTime}
				${_order.arrivalTime.format("yyyy-MM-dd hh:mm:ss")}
				#{/if}
			</td>
			<td class="leftSide">指定物流:</td>
			<td class="rightSide">${_order.orderTransportCompany}</td>
		</tr>
		<tr>
			<td class="leftSide">其他备注说明：</td>
			<td class="rightSide" colspan="3">${_order.remark}</td>
		</tr>
		<tr>
			<td colspan="4"><hr></td>
		</tr>
		<tr>
			<td class="leftSide">订单处理：</td>
			<td class="rightSide" colspan="3">&nbsp;</td>
		</tr>
		<tr>
			<td class="leftSide">物流信息：</td>
			<td class="rightSide">&nbsp;</td>
			<td class="leftSide">单号：</td>
			<td class="rightSide">&nbsp;</td>
		</tr>
		<tr>
			<td>订单清单：</td>
			<td colspan="3">
				<table class="commodity-table">
					<thead>
						<tr>
							<th>商品编号</th>
							<th>商品名称</th>
							<th>购买数量</th>
							<th>库存</th>
							<th>单个重量(KG)</th>
							<th>总重量(KG)</th>
							<th>单价(元)</th>
							<th>总额(元)</th>
							<th>备注</th>
						</tr>
					</thead>
					<tbody>
						#{if _order.orderItems}
							#{list items:_order.orderItems, as:'item'}
							<tr>
								<td><a href="/commodities/${item.commodity.id}">${item.commodity.SN}</a></td>
								<td><a href="/commodities/${item.commodity.id}">${item.commodity.name}</a></td>
								<td>${item.quantity} ${item.commodity.unit}</td>
								<td>${item.commodity.quantityLeft}</td>
								<td>${item.commodity.weight}</td>
								<td>${item.commodity.weight*1000*item.quantity/1000}</td>
								<td><span class="important">${item.price}</span></td>
								<td><span class="important">${item.price*1000*item.quantity/1000}</span></td>
								<td>${item.remark}</td>
							</tr>
							#{/list}
							<tr>
								<td colspan="4">&nbsp;</td>
								<td colspan="2">合计重量：<font class="price">${_order.totalWeight}</font>KG</td>
								<td colspan="2">合计价格：<font class="price">${_order.commodityPrice}</font>元</td>
								<td>&nbsp;</td>
							</tr>
							<tr>
								<td colspan="9" class="rightSide" style="color:#000;">
									配送费用：<font class="price">${_order.totalFreight}</font> 元<br><br>
									总计费用：<span class="price">${_order.totalPrice}</span>&nbsp;元<br><br>
								</td>
							</tr>
						#{/if}
						#{else}
						<tr>
							<td colspan="9">没有商品！</td>
						</tr>
						#{/else}
					</tbody>
				</table>
			</td>
		</tr>
	</tbody>
</table>